package models

import "tuowei.com/common/models"

type SysLearningList struct {
	models.Model
	CourseId int    `json:"course_id" gorm:"int(10);comment:课程ID"`
	Name     string `json:"name" gorm:"varchar(20);comment:学习名称"`
	Cover    string `json:"cover" gorm:"varchar(255);comment:学习封面"`
	Status   int    `json:"status" gorm:"tinyint(2);comment:学习状态"`
	BuyerId  int    `json:"buyer_id" comment:"购买学员ID"`
	Subject  string `json:"subject" comment:"科目"`
	models.ModelTime
}

func (SysLearningList) TableName() string {
	return "sys_learning_list"
}

type LearningList struct {
	models.Model
	CourseId     int    `json:"course_id" gorm:"int(10);comment:课程ID"`
	Name         string `json:"name" gorm:"varchar(20);comment:学习名称"`
	Cover        string `json:"cover" gorm:"varchar(255);comment:学习封面"`
	Status       int    `json:"status" gorm:"tinyint(2);comment:学习状态"`
	StatusText   string `json:"status_text" gorm:"-" comment:"学习状态字符串"`
	ChapterCount int    `json:"chapter_count" gorm:"-" comment:"章节总数"`
	VideoCount   int    `json:"video_count" gorm:"-" comment:"视频总数"`
	DataCount    int    `json:"data_count" gorm:"-" comment:"资料总数"`
	Subject      string `json:"subject" comment:"科目"`
	models.ModelTime
}

func (LearningList) TableName() string {
	return "sys_learning_list"
}
